<script lang="ts">
import { defineComponent, ref } from 'vue'

interface FilterFormState {
  startDate: string
  endDate: string
  sort: string
}

export default defineComponent({
  name: 'FilterPanel',
  setup() {
    const filterForm = ref<FilterFormState>({
      startDate: '',
      endDate: '',
      sort: 'time'
    })

    return {
      filterForm
    }
  }
})
</script>

<template>
  <el-form-item label="排序" prop="sort">
    <el-radio-group v-model="filterForm.sort">
      <el-radio-button value="time">时间</el-radio-button>
      <el-radio-button value="name">名称</el-radio-button>
      <el-radio-button value="calories">热量</el-radio-button>
    </el-radio-group>
  </el-form-item>
</template> 